﻿@inject NotificationService NotificationService

<RadzenStack Orientation="Orientation.Horizontal" AlignItems="AlignItems.Center" Gap="1rem" Wrap="FlexWrap.Wrap">
    <RadzenSplitButton Click=@(args => OnClick(args, "SplitButton with text")) Text="SplitButton" Variant="Variant.Outlined">
        <ChildContent>
            <RadzenSplitButtonItem Text="Item1" Value="1" />
            <RadzenSplitButtonItem Text="Item2" Value="2" />
        </ChildContent>
    </RadzenSplitButton>
    <RadzenSplitButton Click=@(args => OnClick(args, "SplitButton with text")) Text="SplitButton" ButtonStyle="ButtonStyle.Secondary" Variant="Variant.Outlined">
        <ChildContent>
            <RadzenSplitButtonItem Text="Item1" Value="1" />
            <RadzenSplitButtonItem Text="Item2" Value="2" />
        </ChildContent>
    </RadzenSplitButton>
    <RadzenSplitButton Click=@(args => OnClick(args, "SplitButton with text")) Text="SplitButton" ButtonStyle="ButtonStyle.Info" Variant="Variant.Outlined">
        <ChildContent>
            <RadzenSplitButtonItem Text="Item1" Value="1" />
            <RadzenSplitButtonItem Text="Item2" Value="2" />
        </ChildContent>
    </RadzenSplitButton>
    <RadzenSplitButton Click=@(args => OnClick(args, "SplitButton with text")) Text="SplitButton" ButtonStyle="ButtonStyle.Success" Variant="Variant.Outlined">
        <ChildContent>
            <RadzenSplitButtonItem Text="Item1" Value="1" />
            <RadzenSplitButtonItem Text="Item2" Value="2" />
        </ChildContent>
    </RadzenSplitButton>
    <RadzenSplitButton Click=@(args => OnClick(args, "SplitButton with text")) Text="SplitButton" ButtonStyle="ButtonStyle.Warning" Variant="Variant.Outlined">
        <ChildContent>
            <RadzenSplitButtonItem Text="Item1" Value="1" />
            <RadzenSplitButtonItem Text="Item2" Value="2" />
        </ChildContent>
    </RadzenSplitButton>
    <RadzenSplitButton Click=@(args => OnClick(args, "SplitButton with text")) Text="SplitButton" ButtonStyle="ButtonStyle.Danger" Variant="Variant.Outlined">
        <ChildContent>
            <RadzenSplitButtonItem Text="Item1" Value="1" />
            <RadzenSplitButtonItem Text="Item2" Value="2" />
        </ChildContent>
    </RadzenSplitButton>
</RadzenStack>

<RadzenText TextStyle="TextStyle.Subtitle1" TagName="TagName.H3" class="rz-mt-4">Outlined Shades</RadzenText>
<RadzenStack Gap="1rem">
    <RadzenStack Orientation="Orientation.Horizontal" AlignItems="AlignItems.Center" Gap="1rem" Wrap="FlexWrap.Wrap">
        <RadzenSplitButton Click=@(args => OnClick(args, "SplitButton with text")) Text="SplitButton" Shade="Shade.Lighter" Variant="Variant.Outlined">
            <ChildContent>
                <RadzenSplitButtonItem Text="Item1" Value="1" />
                <RadzenSplitButtonItem Text="Item2" Value="2" />
            </ChildContent>
        </RadzenSplitButton>
        <RadzenSplitButton Click=@(args => OnClick(args, "SplitButton with text")) Text="SplitButton" ButtonStyle="ButtonStyle.Secondary" Shade="Shade.Lighter" Variant="Variant.Outlined">
            <ChildContent>
                <RadzenSplitButtonItem Text="Item1" Value="1" />
                <RadzenSplitButtonItem Text="Item2" Value="2" />
            </ChildContent>
        </RadzenSplitButton>
        <RadzenSplitButton Click=@(args => OnClick(args, "SplitButton with text")) Text="SplitButton" ButtonStyle="ButtonStyle.Info" Shade="Shade.Lighter" Variant="Variant.Outlined">
            <ChildContent>
                <RadzenSplitButtonItem Text="Item1" Value="1" />
                <RadzenSplitButtonItem Text="Item2" Value="2" />
            </ChildContent>
        </RadzenSplitButton>
        <RadzenSplitButton Click=@(args => OnClick(args, "SplitButton with text")) Text="SplitButton" ButtonStyle="ButtonStyle.Success" Shade="Shade.Lighter" Variant="Variant.Outlined">
            <ChildContent>
                <RadzenSplitButtonItem Text="Item1" Value="1" />
                <RadzenSplitButtonItem Text="Item2" Value="2" />
            </ChildContent>
        </RadzenSplitButton>
        <RadzenSplitButton Click=@(args => OnClick(args, "SplitButton with text")) Text="SplitButton" ButtonStyle="ButtonStyle.Warning" Shade="Shade.Lighter" Variant="Variant.Outlined">
            <ChildContent>
                <RadzenSplitButtonItem Text="Item1" Value="1" />
                <RadzenSplitButtonItem Text="Item2" Value="2" />
            </ChildContent>
        </RadzenSplitButton>
        <RadzenSplitButton Click=@(args => OnClick(args, "SplitButton with text")) Text="SplitButton" ButtonStyle="ButtonStyle.Danger" Shade="Shade.Lighter" Variant="Variant.Outlined">
            <ChildContent>
                <RadzenSplitButtonItem Text="Item1" Value="1" />
                <RadzenSplitButtonItem Text="Item2" Value="2" />
            </ChildContent>
        </RadzenSplitButton>
    </RadzenStack>
    <RadzenStack Orientation="Orientation.Horizontal" AlignItems="AlignItems.Center" Gap="1rem" Wrap="FlexWrap.Wrap">
        <RadzenSplitButton Click=@(args => OnClick(args, "SplitButton with text")) Text="SplitButton" Shade="Shade.Light" Variant="Variant.Outlined">
            <ChildContent>
                <RadzenSplitButtonItem Text="Item1" Value="1" />
                <RadzenSplitButtonItem Text="Item2" Value="2" />
            </ChildContent>
        </RadzenSplitButton>
        <RadzenSplitButton Click=@(args => OnClick(args, "SplitButton with text")) Text="SplitButton" ButtonStyle="ButtonStyle.Secondary" Shade="Shade.Light" Variant="Variant.Outlined">
            <ChildContent>
                <RadzenSplitButtonItem Text="Item1" Value="1" />
                <RadzenSplitButtonItem Text="Item2" Value="2" />
            </ChildContent>
        </RadzenSplitButton>
        <RadzenSplitButton Click=@(args => OnClick(args, "SplitButton with text")) Text="SplitButton" ButtonStyle="ButtonStyle.Info" Shade="Shade.Light" Variant="Variant.Outlined">
            <ChildContent>
                <RadzenSplitButtonItem Text="Item1" Value="1" />
                <RadzenSplitButtonItem Text="Item2" Value="2" />
            </ChildContent>
        </RadzenSplitButton>
        <RadzenSplitButton Click=@(args => OnClick(args, "SplitButton with text")) Text="SplitButton" ButtonStyle="ButtonStyle.Success" Shade="Shade.Light" Variant="Variant.Outlined">
            <ChildContent>
                <RadzenSplitButtonItem Text="Item1" Value="1" />
                <RadzenSplitButtonItem Text="Item2" Value="2" />
            </ChildContent>
        </RadzenSplitButton>
        <RadzenSplitButton Click=@(args => OnClick(args, "SplitButton with text")) Text="SplitButton" ButtonStyle="ButtonStyle.Warning" Shade="Shade.Light" Variant="Variant.Outlined">
            <ChildContent>
                <RadzenSplitButtonItem Text="Item1" Value="1" />
                <RadzenSplitButtonItem Text="Item2" Value="2" />
            </ChildContent>
        </RadzenSplitButton>
        <RadzenSplitButton Click=@(args => OnClick(args, "SplitButton with text")) Text="SplitButton" ButtonStyle="ButtonStyle.Danger" Shade="Shade.Light" Variant="Variant.Outlined">
            <ChildContent>
                <RadzenSplitButtonItem Text="Item1" Value="1" />
                <RadzenSplitButtonItem Text="Item2" Value="2" />
            </ChildContent>
        </RadzenSplitButton>
    </RadzenStack>
    <RadzenStack Orientation="Orientation.Horizontal" AlignItems="AlignItems.Center" Gap="1rem" Wrap="FlexWrap.Wrap">
        <RadzenSplitButton Click=@(args => OnClick(args, "SplitButton with text")) Text="SplitButton" Shade="Shade.Dark" Variant="Variant.Outlined">
            <ChildContent>
                <RadzenSplitButtonItem Text="Item1" Value="1" />
                <RadzenSplitButtonItem Text="Item2" Value="2" />
            </ChildContent>
        </RadzenSplitButton>
        <RadzenSplitButton Click=@(args => OnClick(args, "SplitButton with text")) Text="SplitButton" ButtonStyle="ButtonStyle.Secondary" Shade="Shade.Dark" Variant="Variant.Outlined">
            <ChildContent>
                <RadzenSplitButtonItem Text="Item1" Value="1" />
                <RadzenSplitButtonItem Text="Item2" Value="2" />
            </ChildContent>
        </RadzenSplitButton>
        <RadzenSplitButton Click=@(args => OnClick(args, "SplitButton with text")) Text="SplitButton" ButtonStyle="ButtonStyle.Info" Shade="Shade.Dark" Variant="Variant.Outlined">
            <ChildContent>
                <RadzenSplitButtonItem Text="Item1" Value="1" />
                <RadzenSplitButtonItem Text="Item2" Value="2" />
            </ChildContent>
        </RadzenSplitButton>
        <RadzenSplitButton Click=@(args => OnClick(args, "SplitButton with text")) Text="SplitButton" ButtonStyle="ButtonStyle.Success" Shade="Shade.Dark" Variant="Variant.Outlined">
            <ChildContent>
                <RadzenSplitButtonItem Text="Item1" Value="1" />
                <RadzenSplitButtonItem Text="Item2" Value="2" />
            </ChildContent>
        </RadzenSplitButton>
        <RadzenSplitButton Click=@(args => OnClick(args, "SplitButton with text")) Text="SplitButton" ButtonStyle="ButtonStyle.Warning" Shade="Shade.Dark" Variant="Variant.Outlined">
            <ChildContent>
                <RadzenSplitButtonItem Text="Item1" Value="1" />
                <RadzenSplitButtonItem Text="Item2" Value="2" />
            </ChildContent>
        </RadzenSplitButton>
        <RadzenSplitButton Click=@(args => OnClick(args, "SplitButton with text")) Text="SplitButton" ButtonStyle="ButtonStyle.Danger" Shade="Shade.Dark" Variant="Variant.Outlined">
            <ChildContent>
                <RadzenSplitButtonItem Text="Item1" Value="1" />
                <RadzenSplitButtonItem Text="Item2" Value="2" />
            </ChildContent>
        </RadzenSplitButton>
    </RadzenStack>
    <RadzenStack Orientation="Orientation.Horizontal" AlignItems="AlignItems.Center" Gap="1rem" Wrap="FlexWrap.Wrap">
        <RadzenSplitButton Click=@(args => OnClick(args, "SplitButton with text")) Text="SplitButton" Shade="Shade.Darker" Variant="Variant.Outlined">
            <ChildContent>
                <RadzenSplitButtonItem Text="Item1" Value="1" />
                <RadzenSplitButtonItem Text="Item2" Value="2" />
            </ChildContent>
        </RadzenSplitButton>
        <RadzenSplitButton Click=@(args => OnClick(args, "SplitButton with text")) Text="SplitButton" ButtonStyle="ButtonStyle.Secondary" Shade="Shade.Darker" Variant="Variant.Outlined">
            <ChildContent>
                <RadzenSplitButtonItem Text="Item1" Value="1" />
                <RadzenSplitButtonItem Text="Item2" Value="2" />
            </ChildContent>
        </RadzenSplitButton>
        <RadzenSplitButton Click=@(args => OnClick(args, "SplitButton with text")) Text="SplitButton" ButtonStyle="ButtonStyle.Info" Shade="Shade.Darker" Variant="Variant.Outlined">
            <ChildContent>
                <RadzenSplitButtonItem Text="Item1" Value="1" />
                <RadzenSplitButtonItem Text="Item2" Value="2" />
            </ChildContent>
        </RadzenSplitButton>
        <RadzenSplitButton Click=@(args => OnClick(args, "SplitButton with text")) Text="SplitButton" ButtonStyle="ButtonStyle.Success" Shade="Shade.Darker" Variant="Variant.Outlined">
            <ChildContent>
                <RadzenSplitButtonItem Text="Item1" Value="1" />
                <RadzenSplitButtonItem Text="Item2" Value="2" />
            </ChildContent>
        </RadzenSplitButton>
        <RadzenSplitButton Click=@(args => OnClick(args, "SplitButton with text")) Text="SplitButton" ButtonStyle="ButtonStyle.Warning" Shade="Shade.Darker" Variant="Variant.Outlined">
            <ChildContent>
                <RadzenSplitButtonItem Text="Item1" Value="1" />
                <RadzenSplitButtonItem Text="Item2" Value="2" />
            </ChildContent>
        </RadzenSplitButton>
        <RadzenSplitButton Click=@(args => OnClick(args, "SplitButton with text")) Text="SplitButton" ButtonStyle="ButtonStyle.Danger" Shade="Shade.Darker" Variant="Variant.Outlined">
            <ChildContent>
                <RadzenSplitButtonItem Text="Item1" Value="1" />
                <RadzenSplitButtonItem Text="Item2" Value="2" />
            </ChildContent>
        </RadzenSplitButton>
    </RadzenStack>
</RadzenStack>

<RadzenText TextStyle="TextStyle.Subtitle1" TagName="TagName.H3" class="rz-mt-4">Outlined Light and Dark</RadzenText>
<RadzenText TextStyle="TextStyle.Body2" class="rz-mb-4">Light and Dark button styles don't have Shades</RadzenText>
<RadzenStack Orientation="Orientation.Horizontal" AlignItems="AlignItems.Center" Gap="1rem" Wrap="FlexWrap.Wrap" class="rz-background-color-base-500 rz-p-4">
    <RadzenSplitButton Click=@(args => OnClick(args, "SplitButton with text")) Text="SplitButton" ButtonStyle="ButtonStyle.Light" Variant="Variant.Outlined">
        <ChildContent>
            <RadzenSplitButtonItem Text="Item1" Value="1" />
            <RadzenSplitButtonItem Text="Item2" Value="2" />
        </ChildContent>
    </RadzenSplitButton>
    <RadzenSplitButton Click=@(args => OnClick(args, "SplitButton with text")) Text="SplitButton" ButtonStyle="ButtonStyle.Dark" Variant="Variant.Outlined">
        <ChildContent>
            <RadzenSplitButtonItem Text="Item1" Value="1" />
            <RadzenSplitButtonItem Text="Item2" Value="2" />
        </ChildContent>
    </RadzenSplitButton>
</RadzenStack>

@code {
    void OnClick(RadzenSplitButtonItem item, string buttonName)
    {
        if (item != null)
        {
            NotificationService.Notify(new NotificationMessage { Severity = NotificationSeverity.Info, Summary = "SplitButton Item Clicked", Detail = $"{buttonName}, item with value {item.Value} clicked" });
        }
        else
        {
            NotificationService.Notify(new NotificationMessage { Severity = NotificationSeverity.Info, Summary = "SplitButton Clicked", Detail = $"{buttonName} clicked" });
        }
    }
}
